var is_mobi = navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
var username = window.localStorage.getItem("userName");
var token = window.localStorage.getItem("token", token);
function recruit(){
        if(is_mobi){
            location.href="/cultivate/myResumes"
        }else{
            location.href="/cultivate/myResume"
        }
    }
    function add(){
        if(is_mobi){
            location.href = '/cultivate/addResumes';
        }else{
            location.href = '/cultivate/addResume';
        }
    }
    function job(){
        if(is_mobi){
            location.href='/cultivate/recruitMobile'
 
         }else{
             location.href='/cultivate/getRecruit'
         };
    }
    function edit(){
        if(is_mobi){
            location.href="/cultivate/editResumes"
        }else{
            location.href="/cultivate/editResume"
        }
    }
    function mock2(that){
        indexType = $(that).attr("data-type");
        layer.confirm('亲爱的各位同学：'+'<br>'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'很高兴使用金职伟业证书模拟考评系统。希望你们在证书考评中取得优秀成绩。正如教育部一直强调的，1+X证书是为了帮助大家掌握技能，提升就业能力。因此金职伟业积极对接企业，提供大批优质实习就业岗位。各位同学可以完善简历以获得更多实习就业机会。如果不希望推荐就业，也希望同学说出原因方便我们改进工作。感谢各位同学的支持和理解！'+'<br>'+'<br>'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'&nbsp;'+'湖南金职伟业母婴护理有限公司 '
        , {
            area: ['500px', '350px'],
            btn: ['好，去完善简历','不了，谢谢'] 
          }, function(){
              ajaxToken('/certificate/isResumeUser','GET',{token:token},function(res){
             
                    if(res== 1){
                       
                        if(indexType == 2){
                            window.open("/certificate/mock?grade=2","_blank");
                        }if(indexType == 1){
                            window.open("/certificate/mock?grade=1","_blank");
                        }if(indexType == 0){
                            window.open("/certificate/mock?grade=0","_blank");
                        }
                        
                        
                    }if(res== 2){
                         window.open("/certificate/isResume?indexType="+indexType,"_blank");
                    }
                    else{
                        layer.msg(res.msg)
                    }
                }
          )
            
            
          }, function(){
            ajaxToken('/certificate/feedbackList','GET',{token:token},function(result){
                
                if(result == 1){
                         if(indexType == 2){
                            window.open("/certificate/mock?grade=2","_blank");
                        }if(indexType == 1){
                            window.open("/certificate/mock?grade=1","_blank");
                        }if(indexType == 0){
                            window.open("/certificate/mock?grade=0","_blank");
                        }    
                }if(result == 2){
                    window.open("/cultivate/unRecommend?indexType="+indexType,"_blank");
                }
            }
               
              )
            
           });
    }
    window.onload = function(){
        if(is_mobi){
            $("#personal_data").find('li').eq(9).hide();
            $("#personal_data").find('li').eq(10).hide();
            $("#personal_data").find('li').eq(11).hide();
        };

    }